<!-- 横向 -->
<template>
  <div class="books-cross">
    <router-link to="/">
      <img class="books_fm" src="books_fm/hongloumeng.jpg" />
      <div class="text">
        <div class="top">
          <h4>红楼梦</h4>
          <span>中国古典四大名著之一</span>
        </div>
        <div class="bottom">
          <span>曹雪芹</span>
          <span>四大名著之一</span>
        </div>
      </div>
    </router-link>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: null,
    };
  },

  mounted() {
    this.getData();
  },

  methods: {
    getData() {
      var url = `https://api.xin88.top/bilibili/news.json`;
      this.axios.get(url).then((res) => {
        console.log(res);
        this.data = res.data;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>